#include <iostream>
#ifndef NODE_H
#define NODE_H
class Node
{
	protected:
		int number;
		Node *next;
		Node *prev;
	public:
		Node();
		Node(int x);
		int getNumber(void) const;
		Node* getNext(void) const;
		Node* getPrev(void) const;
		void setNext(Node *p);
		void setPrev(Node *p);
		friend std::istream& operator >> (std::istream &in, Node &N);
};
class List : public Node
{
	private:
		Node *first;
		Node *last;
	public:
		List();
		void operator + (int n);
		void operator + (const Node &N);
		void Print(void) const;
		bool operator == (const List &L);
		bool operator == (const List *L);
		bool operator != (const List &L);
		bool operator != (const List *L);
};
#endif